Skip to content

feat(#622): structure the ci discord alert and document the alarms format - #695

Merged
zgeoff merged 3 commits into
mainfrom
feat/622-unify-discord-alerts
Jul 20, 2026
Merged

feat(#622): structure the ci discord alert and document the alarms format#695
zgeoff merged 3 commits into
mainfrom
feat/622-unify-discord-alerts

Conversation

@zgeoff

@zgeoff zgeoff commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Description

Closes #622

Give the alarms Discord channel a scannable alert from the one source that exposes a configurable body — CI — and record the format and the tool limits of the others.

  • CI's alert job posts a structured embed: a [CI] critical — … title, the run link, a "Failed jobs" field, and a red severity colour (#e5484d / 15026253).
  • Axiom stays its stock discordWebhook format: its custom-webhook notifier (the only templated body it offers) is plan-gated — pulumi up against prod returns 400 feature not enabled: notifiersCustomWebhook. Adoption once enabled is captured in feat: post the canonical alarms embed from axiom via custom-webhook #697 with the full implementation.
  • Bugsink stays stock — its Discord messaging service exposes no templating. A relay was out of scope.
  • Format and the two stock exceptions documented in observability.md and the Bugsink README.

Testing

  • bun run lint passes
  • pulumi preview against prod is a no-op (17 unchanged) — infra-drift stays green
  • bun run test — no tests touched

Context

The custom-webhook approach was built and applied against prod; the apply surfaced the plan gate (creates failed, no delete ran, alerting path untouched). Reverting Axiom to stock keeps the branch a no-op against live infra. The parked implementation lives in #697.

Give the alarms channel one scannable embed: a `[source] severity — what
fired` title, one investigation link, and a severity colour. Axiom moves to
two custom-webhook notifiers (critical, warning) posting the canonical embed
with a recovery colour on clear; CI's alert job builds the same shape. Bugsink
stays its stock format — its messaging service exposes no templating.

Documents the format and palette in observability.md, and notes the Bugsink
exception in its README.
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR introduces severity-specific Axiom Discord notifiers and a shared canonical embed renderer, aligns CI failure alerts with the critical embed format, and documents alarm sources, severity colors, provisioning, and Bugsink’s fixed Discord message shape.

Changes

Canonical alarm notifications

Layer / File(s) Summary
Severity-specific Axiom notifier routing
infra/axiom.ts, infra/index.ts
Axiom now separates critical and warning notifiers, renders severity-aware webhook embeds, routes monitors accordingly, and exports the new notifier names.
CI critical alarm payload
.github/workflows/main.yml
The CI alert uses a fixed critical title and color and reports failed jobs in a dedicated embed field.
Alarm channel documentation
docs/architecture/platform/observability.md, docs/architecture/platform/deployment.md, apps/bugsink/README.md
Documentation describes the canonical alarm format, notifier provisioning, severity colors, and Bugsink’s non-templated Discord body.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • zgeoff/vers#630: Both update the CI Discord failure alert payload and failed-job reporting.
  • zgeoff/vers#666: Both modify Axiom notifier wiring and exported notifier names.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement the shared alert format, update CI and Axiom, and document the Bugsink exception and deployment notes for #622.
Out of Scope Changes check ✅ Passed No clear out-of-scope changes stand out; the edits all support the alert-format unification and related documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: structuring CI Discord alerts and documenting the alarms format.
Description check ✅ Passed The description is clearly related to the changeset and matches the CI alert, Axiom, Bugsink, and documentation updates.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/622-unify-discord-alerts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@infra/axiom.ts`:
- Line 101: Update the alarmsWebhookHeaders declaration to use an as const
assertion, making its shared webhook configuration properties readonly while
preserving the existing header values.
- Around line 300-310: Update the URL field in buildAlarmsWebhookBody to target
the organization-scoped Axiom monitor view, incorporating the template’s
.MonitorID value instead of linking to the console home.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: abc31823-6a1d-4e21-a2c3-81030a370d7e

📥 Commits

Reviewing files that changed from the base of the PR and between 942f812 and ee94fac.

📒 Files selected for processing (6)
  • .github/workflows/main.yml
  • apps/bugsink/README.md
  • docs/architecture/platform/deployment.md
  • docs/architecture/platform/observability.md
  • infra/axiom.ts
  • infra/index.ts

Comment thread infra/axiom.ts Outdated
Comment thread infra/axiom.ts Outdated
zgeoff added 2 commits July 20, 2026 02:23
Axiom's custom-webhook notifier is plan-gated (the notifiersCustomWebhook
feature returns a 400), so it can't carry the canonical embed without a
relay. Revert Axiom to its stock discordWebhook notifier; the CI structured
embed and the documented alarms format stay. Axiom's adoption is captured as
a follow-up.
@zgeoff zgeoff changed the title feat(#622): unify the discord alarm format across axiom and ci feat(#622): structure the ci discord alert and document the alarms format Jul 19, 2026
@zgeoff
zgeoff merged commit 50b03cd into main Jul 20, 2026
7 checks passed
@zgeoff
zgeoff deleted the feat/622-unify-discord-alerts branch July 20, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

platform: unify the discord alert format across bugsink, ci, and axiom

1 participant